package cn.brucemaa.spring_ai_demo.config;

import org.springframework.ai.chat.model.ChatModel;
import org.springframework.ai.transformer.SummaryMetadataEnricher;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Configuration
class EnricherConfig {

    @Bean
    public SummaryMetadataEnricher summaryMetadata(ChatModel aiClient) {
        return new SummaryMetadataEnricher(aiClient,
                List.of(SummaryMetadataEnricher.SummaryType.PREVIOUS, SummaryMetadataEnricher.SummaryType.CURRENT, SummaryMetadataEnricher.SummaryType.NEXT));
    }
}
